import axios from "axios"
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'

const request=axios.create({
    baseURL: 'http://localhost:8080/',
    timeout: 10000,
})
// 请求拦截
request.interceptors.request.use(
    config=>{
        NProgress.start()

    }
)
// 相应拦截
request.interceptors.response.use(
    config=>{
        NProgress.done()
        
    }
)

export default request